// Java Strings
public class Sample09 {
  public static void main(String[] args) {
    String txt = "Hello World";
    System.out.println("The length of the txt string is: " + txt.length());

    System.out.println(txt.toUpperCase()); // Outputs "HELLO WORLD"
    System.out.println(txt.toLowerCase()); // Outputs "hello world"

    System.out.println(txt.indexOf("world"));

    String firstName = "John";
    String lastName = "Doe";
    System.out.println(firstName + " " + lastName);
    System.out.println(firstName.concat(lastName));

    String txt1 = "We are the so-called \"Vikings\" from the north.";
    String txt2 = "It\'s alright.";
    String txt3 = "The character \\ is called backslash.";

    System.out.println(txt1);
    System.out.println(txt2);
    System.out.println(txt3);
  }
}